<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>修改昵称</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/api.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/aui.css"/>
    <style>
    	body{
    		 background-color:#fff;
    	}
    	.line{
    	   background-color:#F2F2F2;
    	   width:100%;
    	   height:0.5rem;
    	}
    	 .rela{
           height:2.5rem;
          
           
          }
          input[type="text"] {
            border: none;
            padding: 0.6rem 0.75rem;
            width: 100%;
            height: 2.4rem;
            line-height: normal;
            font-size: 0.75rem;
            border-radius: 0;
            background-color: #fff;
            margin: 0 auto;
            color: #545454;
            padding-top: 0.8rem;
            /*border-bottom: 1px solid #e8e8e8;*/
           /* background-size: 100% 1px;
        	background-repeat: no-repeat;
        	background-position: bottom;
            background-image: linear-gradient(0,#e8e8e8,#e8e8e8 50%,transparent 50%);
            background-image: -webkit-linear-gradient(90deg,#e8e8e8,#e8e8e8 50%,transparent 50%);*/

         }
         ::-webkit-input-placeholder {
	          color: #868686;
         }
          .aui-iconfont.abso{
      		  width:40px;
      		  height:2.4rem;
      		  /*margin:auto 0;*/
           /* padding: 0.65rem 0;*/
            background-color:#fff;
          }
          .imggg{
            float:right;
            height: 22px;
            width: 22px;
            margin-right:0.75rem;
            margin-top:0.7rem;
          }
          .fontdaxiao{
            font-size:0.6rem;
            color:#999999;
            padding-left: 0.75rem;
            margin-top:0.5rem;
          }
    
    </style>
	<style>
		.aui-iconfont {
			position: relative;
			font-family: "aui_iconfont" !important;
			font-size: 0.7rem;
			font-style: normal;
			-webkit-font-smoothing: antialiased;
			-moz-osx-font-smoothing: grayscale;
			height: 2.4rem;
		}

		.aui-icon-tu{
			height: 2.4rem;
			width: 49px;
			background: url('__IMG__/left.png') no-repeat center center;
			background-size: 10px 17.5px;
		}
	</style>
</head>
<body>
<header class="aui-bar aui-bar-nav underLine">
	<a class="aui-pull-left" tapmode="active" onclick="window.history.back(-1);"> <span class="aui-iconfont aui-icon-tu"> </span> </a>
	<div class="aui-title">个人信息</div>

	<a class="aui-pull-right" >
		<span class="aui-iconfont" tapmode="active" onclick="right()" style="color: #000000; padding-right: 20px;">确定</span>
	</a>
</header>
<div class="line"></div>
	<div class="rela flex-wrap underLine">
	    <input type="text" value="{$user.user_username}" placeholder="请输入昵称" id="name" class="ssss flex-con" maxlength='20'>
	    <div class="abso aui-iconfont" id="show">
	      <img class="imggg" src="__IMG__/cha1.png" alt="">
	    </div>
  	</div>
  	<p class="fontdaxiao">可由中英文、数字组成</p>
</body>
<input type="hidden" id="uid" value="{$user.user_id}" />
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script type="text/javascript">
    $('.imggg').click(function () {
        $('#name').val('');
    })
	function right() {
		var name = $('#name').val();
		if(name == ''){
		    alert('不能为空');
		}else{
            var uid = $('#uid').val();
            $.ajax({
                url: '{:url("My/AjaxUserCenter")}',
                data: 'name=user_username' + '&value=' + name + '&uid=' + uid,//
                type: 'POST',
                dataType: 'JSON',
                success: function (data) {
                    window.history.back(-1);

                },
                error: function () {
                    alert('Ajax error!');
                }
            })
		}
    }
</script>
</html>